// 购物车
import mongoose from 'mongoose'
import Model from './model'
const cartSchema = new mongoose.Schema({
  id: {
    type: String,
    require: true
  },
  // 商品详情
  detail: {
    type: Array,
    require: true
  },
  cart_id: {
    type: String,
    require: true
  },
  user: {
    type: String,
    require: true
  },
  add_time: {
    type: String,
    require: true
  }
})

class cartModel extends Model {
  constructor(connection, schema, name) {
    super(connection, schema, name)
  }
  
}

export default new cartModel(mongoose, cartSchema, 'carts')
